<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('admin.welcome');
});

//登录界面
Route::get('admin/login/index','admin\LoginController@login');
//后台主页
Route::get('admin/index/index', 'admin\IndexController@index');
//后台欢迎界面
Route::get('admin/index/welcome', 'admin\IndexController@welcome');
//检查登录
Route::get('admin/login/checkLogin', 'admin\LoginController@checkLogin');


//产品列表
Route::get('admin/product/index', 'admin\ProductController@index');
//产品添加
Route::get('admin/product/add', 'admin\ProductController@add');
//产品保存
Route::post('admin/product/save', 'admin\ProductController@save');

//产品分类页面
Route::get('admin/category/index','Admin\CategoryController@index');
//添加
Route::get('admin/category/add','admin\CategoryController@add');
//保存
Route::post('admin/category/save','admin\CategoryController@save');
//修改
Route::get('admin/category/edit','adminCategoryController@edit');


